classdef BinaryClassFilter ...
        < Filter
    %BINARYCLASSFILTER Summary of this class goes here
    %   Detailed explanation goes here
    
    properties
    end
    
    methods
        function [ this ] =  BinaryClassFilter( name )
            if nargin == 0
                this.setName('bclass_filter');
            end
            if nargin >= 1
                this.setName(name);
            end
        end
    end
    
    methods
        function [  ] = build( this, X1, Y1 )
            % `this.model.zScore` is non-ranked, while
            % `this.model.zRank` is ranked
            
            nFeature = size(X1, 2);
            this.model.zScore = zeros(1, nFeature);
            for iFeature = 1:nFeature
                this.model.zScore(iFeature) = this.algorithm0.apply(X1(:, iFeature), Y1);
%                 result_i = this.algorithm0.apply(X1(:, iFeature), Y1);
%                 this.model.zScore(iFeature) = result_i.zScore;
            end
            [~, this.model.zRank] = sort(this.model.zScore, 'descend');
            
            %             kFeature = this.calcFeatureSubsetSizeOn(X1);
            %             this.model.zRank = this.model.zRank(1:kFeature);
            %             this.model.zScore = this.model.zScore(this.model.zRank);
        end
    end
    
end

